package com.example.spring5demo;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.IntStream;

public class Demo {

    public static void main(String[] args) {
        List<Integer>  list1 = new ArrayList<>();
        for (int i = 0; i < 100; i++) {

            list1.add(i);
          /*  for (Integer i : list1){
                System.out.println(i.toString());
            }
            System.out.println("------------------");
            list1.forEach(t->{
                System.out.println(t.toString());
            });*/

        }
        System.out.println("------------------");
        list1.stream().forEach(t->{
            System.out.println(t.toString());
        });

        IntStream.range(0, list1.size()).forEach(t->{
            if(t==1){
                list1.get(t);
            }
        });

    }
}
